WeekDay and DayOfWeek are equivalent functions. However, WeekDay is preferred in Basic syntax and DayOfWeek is preferred in Crystal syntax.
WeekDay returns a number n which is the nth day of the week given a Date or DateTime value.
WeekDay is often useful in performing date computations that take into account special days of the week such as weekends. See the DateSerial (year, month, day) examples section for some examples.
The following examples are applicable to both Basic and Crystal syntax:
Returns 2 since Oct. 3, 1999 is a Monday, and the first day of the week is assumed to be Sunday.
WeekDay (#Oct. 4, 1999#, crMonday)
Returns 1 since Oct. 3, 1999 is a Monday, and the first day of the week is specified to be Monday.
This function is designed to work like the Visual Basic function of the same name.
Seagate Software IMG Holdings, Inc. http://www.seagatesoftware.com Support services: http://support.seagatesoftware.com |